@import '../../../styles/var.scss';

.preselect-page {
  min-height: 100vh;
  background-color: #f5f5fa;
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
  
  .page-title {
    font-size: 36px;
    font-weight: 600;
    color: $text-color-main;
    padding: 32px;
    background-color: #fff;
    text-align: center;
  }
  
  .page-content {
    // padding: 32px;
  }

  .empty-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 32px;
  }

  .section {
    background-color: #fff;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;

    &:last-child {
      margin-bottom: 0;
    }

    .section-title {
      font-size: 32px;
      font-weight: 600;
      color: $text-color-main;
      margin-bottom: 24px;
    }
  }

  // 人员列表
  .person-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .person-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;

    &:last-child {
      border-bottom: none;
      padding-bottom: 0;
    }

    .person-info {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .person-type {
      font-size: 28px;
      color: $text-color-main;
      min-width: 120px;
    }

    .person-name {
      font-size: 28px;
      color: $text-color-main;
      flex: 1;
    }

    .person-price {
      font-size: 28px;
      color: $color-primary;
      font-weight: 500;
    }

    .person-remove {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: #f0f0f0;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-left: 16px;
      cursor: pointer;

      .remove-icon {
        font-size: 32px;
        color: $text-color-secondary;
        line-height: 1;
      }
    }
  }

  // 服装列表
  .dress-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .dress-item {
    display: flex;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid #f0f0f0;

    &:last-child {
      border-bottom: none;
    }

    .dress-image {
      width: 160px;
      height: 160px;
      border-radius: 8px;
      overflow: hidden;
      background-color: #f5f5f5;
      flex-shrink: 0;

      .image {
        width: 100%;
        height: 100%;
      }

      .image-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: $text-color-secondary;
        font-size: 24px;
      }
    }

    .dress-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 8px;

      .dress-header {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: nowrap;
        min-width: 0;
      }

      .dress-tag {
        font-size: 20px;
        padding: 4px 12px;
        border-radius: 4px;
        flex-shrink: 0;
      }

      .dress-name {
        font-size: 28px;
        color: $text-color-main;
        font-weight: 500;
        flex: 1;
        width: 480px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .dress-price {
        font-size: 28px;
        color: $color-primary;
        font-weight: 500;
      }

      .dress-info {
        display: flex;
        align-items: center;
        gap: 16px;
        font-size: 24px;
        color: $text-color-secondary;
      }

      .dress-code {
        font-size: 24px;
        color: $text-color-secondary;
      }

      .dress-size {
        font-size: 24px;
        color: $text-color-secondary;
      }
    }

    .dress-actions {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      justify-content: space-between;
      gap: 8px;

      .dress-remove {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;

        .remove-icon {
          font-size: 32px;
        }
      }

      .dress-quantity {
        font-size: 24px;
        color: $text-color-secondary;
      }
    }
  }

  // 总数
  .total-section {
    // padding: 24px 0;
    text-align: right;

    .total-text {
      font-size: 28px;
      color: $text-color-main;
      font-weight: 500;
    }
  }

  // 提交按钮
  .submit-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 32px 32px;
    background-color: #fff;
    border-top: 1px solid #f0f0f0;
    z-index: 100;
    display: flex;
    gap: 16px;
    align-items: center;

    .record-button {
      flex: 0 0 auto;
      height: 88px;
      border-radius: 44px;
      font-size: 32px;
      font-weight: 500;
      padding: 0 32px;
    }

    .submit-button {
      flex: 1;
      height: 88px;
      border-radius: 44px;
      font-size: 32px;
      font-weight: 500;
    }
  }
}
